<?php
/**
 * Created by PhpStorm.
 * User: iwm
 * Date: 2017/3/6
 * Time: 12:10
 */

namespace app\home\model\page\circle;

use app\api\model\dao\CircleCategory;
use app\library\PageBase;

class CircleCategoryPage extends PageBase
{
    private $obj;

    public function __construct()
    {
        parent::__construct();
        $this->obj = new CircleCategory();
    }

    public function excute($param)
    {
        $ret = $this->checkToken($param);
        if (false === $ret) {
            header('Location:/home/loginpage');
            exit;
        }
        try {
            $ret = $this->obj->circleCategoryPage($param);
        } catch (\think\Exception $e) {
            return $this->getRes(\app\library\Error::ERR_SYS, $e->getMessage());
        }
        $this->data = $ret;
        return $this->getRes();
    }
}